﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace Studio
{
	// Token: 0x020004D0 RID: 1232
	public class DrawLightLine : MonoBehaviour
	{
		// Token: 0x06001F54 RID: 8020 RVA: 0x000C3000 File Offset: 0x000C1200
		public void Add(Light _light)
		{
			this.dicLight.Add(_light, true);
		}

		// Token: 0x06001F55 RID: 8021 RVA: 0x000C3010 File Offset: 0x000C1210
		public void Remove(Light _light)
		{
			this.dicLight.Remove(_light);
		}

		// Token: 0x06001F56 RID: 8022 RVA: 0x000C3020 File Offset: 0x000C1220
		public void Clear()
		{
			this.dicLight.Clear();
		}

		// Token: 0x06001F57 RID: 8023 RVA: 0x000C3030 File Offset: 0x000C1230
		public void SetEnable(Light _light, bool _value)
		{
			if (!this.dicLight.ContainsKey(_light))
			{
				return;
			}
			this.dicLight[_light] = _value;
		}

		// Token: 0x06001F58 RID: 8024 RVA: 0x000C3054 File Offset: 0x000C1254
		private void Start()
		{
			LightLine.shader = this.m_Shader;
		}

		// Token: 0x06001F59 RID: 8025 RVA: 0x000C3064 File Offset: 0x000C1264
		public void OnPostRender()
		{
			if (this.dicLight.Count <= 0)
			{
				return;
			}
			foreach (KeyValuePair<Light, bool> keyValuePair in this.dicLight)
			{
				if (keyValuePair.Value)
				{
					LightLine.DrawLine(keyValuePair.Key);
				}
			}
		}

		// Token: 0x04002121 RID: 8481
		[SerializeField]
		private Shader m_Shader;

		// Token: 0x04002122 RID: 8482
		private Dictionary<Light, bool> dicLight = new Dictionary<Light, bool>();
	}
}
